package com.ruoyi.fs.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fs.mapper.FsRepaymentStatisticMapper;
import com.ruoyi.fs.domain.FsRepaymentStatistic;
import com.ruoyi.fs.service.IFsRepaymentStatisticService;

/**
 * 还款统计Service业务层处理
 * 
 * @author hero
 * @date 2024-11-11
 */
@Service
public class FsRepaymentStatisticServiceImpl implements IFsRepaymentStatisticService 
{
    @Autowired
    private FsRepaymentStatisticMapper fsRepaymentStatisticMapper;

    /**
     * 查询还款统计
     * 
     * @param id 还款统计主键
     * @return 还款统计
     */
    @Override
    public FsRepaymentStatistic selectFsRepaymentStatisticById(Long id)
    {
        return fsRepaymentStatisticMapper.selectFsRepaymentStatisticById(id);
    }

    /**
     * 查询还款统计列表
     * 
     * @param fsRepaymentStatistic 还款统计
     * @return 还款统计
     */
    @Override
    public List<FsRepaymentStatistic> selectFsRepaymentStatisticList(FsRepaymentStatistic fsRepaymentStatistic)
    {
        return fsRepaymentStatisticMapper.selectFsRepaymentStatisticList(fsRepaymentStatistic);
    }

    /**
     * 新增还款统计
     * 
     * @param fsRepaymentStatistic 还款统计
     * @return 结果
     */
    @Override
    public int insertFsRepaymentStatistic(FsRepaymentStatistic fsRepaymentStatistic)
    {
        fsRepaymentStatistic.setCreateTime(DateUtils.getNowDate());
        return fsRepaymentStatisticMapper.insertFsRepaymentStatistic(fsRepaymentStatistic);
    }

    /**
     * 修改还款统计
     * 
     * @param fsRepaymentStatistic 还款统计
     * @return 结果
     */
    @Override
    public int updateFsRepaymentStatistic(FsRepaymentStatistic fsRepaymentStatistic)
    {
        fsRepaymentStatistic.setUpdateTime(DateUtils.getNowDate());
        return fsRepaymentStatisticMapper.updateFsRepaymentStatistic(fsRepaymentStatistic);
    }

    /**
     * 批量删除还款统计
     * 
     * @param ids 需要删除的还款统计主键
     * @return 结果
     */
    @Override
    public int deleteFsRepaymentStatisticByIds(Long[] ids)
    {
        return fsRepaymentStatisticMapper.deleteFsRepaymentStatisticByIds(ids);
    }

    /**
     * 删除还款统计信息
     * 
     * @param id 还款统计主键
     * @return 结果
     */
    @Override
    public int deleteFsRepaymentStatisticById(Long id)
    {
        return fsRepaymentStatisticMapper.deleteFsRepaymentStatisticById(id);
    }
}
